package java5.Parent;

class Parent{
    protected int i=3;
    protected int j=2;
    protected int geti(){
        return i;
    }
    public void getj(){
        System.out.println(j);
    }
}

public class Child extends Parent{
    public static void main(String[] args){
        Parent p = new Parent();
       Child c = new Child();
        c.getParenti();
        c.getParentj();
        Other.showParentj(p);
        OutOfParentPackage.showParentj(p);
        
    }
    public void getParenti(){
        System.out.println(i);//i=1;
    }
    public void getParentj(){
        System.out.println(super.j);//j=2
        System.out.println(j);//j=2;
        System.out.println(geti());//get(i)=1
        System.out.println(super.geti());//1
    }
}

class Other{
    public static void showParentj(Parent p){
        System.out.println(p.j);//p.j=2
        System.out.println(p.geti());//p.geti=1
    }
}

class OutOfParentPackage{
	public static void showParentj(Parent p){
		System.out.println();
		System.out.println(p.j);
		System.out.println(p.geti());
		p.getj();
	}
}